package java.atguigu.algorithm.List;

public class RemoveDoubleElement {
    public int removeDuplicates(int[] nums) {
        int left=0;
        for(int i=1;i<nums.length;i++){
            if(nums[i]!=nums[i-1]){
                nums[left]=nums[i];
                left++;
            }
        }
        return left;
    }
}
